/*
 * OgreFramework.hpp
 *
 *  Created on: 15 Oct 2013
 *      Author: Patrick
 */

#ifndef OGREFRAMEWORK_HPP_
#define OGREFRAMEWORK_HPP_

//|||||||||||||||||||||||||||||||||||||||||||||||

#include <OgreCamera.h>
#include <OgreEntity.h>
#include <OgreLogManager.h>
#include <OgreOverlay.h>
#include <OgreOverlayElement.h>
#include <OgreOverlayManager.h>
#include <OgreRoot.h>
#include <OgreViewport.h>
#include <OgreSceneManager.h>
#include <OgreRenderWindow.h>
#include <OgreConfigFile.h>

#include <OISEvents.h>
#include <OISInputManager.h>
#include <OISKeyboard.h>
#include <OISMouse.h>

#include <SdkTrays.h>

#include "MyInputManager.h"
#include "MyCamera.h"
#include "./map/Map.h"

//|||||||||||||||||||||||||||||||||||||||||||||||

class OgreFramework: public Ogre::Singleton<OgreFramework>,
		OgreBites::SdkTrayListener {

public:
	OgreFramework();
	~OgreFramework();

	bool initOgre(Ogre::String wndTitle);
	void updateOgre(double timeSinceLastFrame);

	bool isOgreToBeShutDown() const;
	void captureInput();
	void setUpDemoScene();

	Ogre::Root* m_pRoot;
	Ogre::SceneManager* m_pSceneMgr;
	Ogre::RenderWindow* m_pRenderWnd;
	Ogre::Log* m_pLog;
	Ogre::Timer* m_pTimer;

private:
	OgreFramework(const OgreFramework&);
	OgreFramework& operator=(const OgreFramework&);
	void updateTrayMgr(double timeSinceLastFrame);

	MyInputManager* m_inputManager;
	MyCamera* m_camera;
	GameMap::Map* m_map;

	OgreBites::SdkTrayManager* m_pTrayMgr;
	Ogre::FrameEvent m_FrameEvent;
	int m_iNumScreenShots;

	bool m_bShutDownOgre;
};

#endif /* OGREFRAMEWORK_HPP_ */
